<?php
session_start();
if(!isset($_SESSION['usuario']))
header('location: ../');
else{
include("PHPMailer/class.phpmailer.php");
include("PHPMailer/class.smtp.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->Username = "scchava888@gmail.com";
$mail->Password = "";
$mail->From = "email@soporte.com";
$mail->FromName = "Refaccionaria";
$mail->Subject = "Correo de pruebas";
$mail->MsgHTML(file_get_contents('boletin/index.html'));
//$mail->AddAttachment("files/files.zip");
//$mail->AddAttachment("files/img03.jpg");
$mail->AddAddress("yochava_888@hotmail.com", "Administrador");
$mail->IsHTML(true);
if(!$mail->Send()) {
 echo "Error: " . $mail->ErrorInfo;

} else {

  echo "Mensaje enviado correctamente";
 

}
}

?>